package com.qf.service.impl;

import com.qf.dao.TeacherDao;
import com.qf.dao.impl.TeacherDaoImpl;
import com.qf.pojo.TBteacher;
import com.qf.service.TeacherService;

import java.util.List;

public class TeacherServiceImpl implements TeacherService {


    @Override
    public List<TBteacher> findAll() {
        //1.声明dao
        TeacherDao teacherDao = new TeacherDaoImpl();
        return  teacherDao.findAll();
    }

    @Override
    public String del(Integer id) {
        TeacherDao teacherDao = new TeacherDaoImpl();
       int row=  teacherDao.del(id);
       if (row>0){
           return "success";
       }
       return "fail";
    }
}
